import { Module, HttpModule } from '@nestjs/common';
import { PassportModule } from '@nestjs/passport';
import { TypeOrmModule } from '@nestjs/typeorm';
import { NewsController } from './news.controller';
import { News } from './news.entity';
import { NewsService } from './news.service';
import { MConstModule } from '../mconst/mconst.module';

@Module({
  imports: [
    HttpModule,
    MConstModule,
    // auth需要用到
    PassportModule.register({ defaultStrategy: 'jwt' }),
    TypeOrmModule.forFeature([News]),
  ],
  providers: [NewsService],
  exports: [NewsService],

  controllers: [NewsController],
})
export class NewsModule {}
